package com.dayaokeji.rhythmschoolstudent.client.home.helper


import android.os.Bundle
import android.support.v4.app.Fragment
import android.text.Html
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup

import com.dayaokeji.rhythmschoolstudent.R
import com.dayaokeji.rhythmschoolstudent.client.common.base.ActivityTemplateMethod
import kotlinx.android.synthetic.main.fragment_helper_step_one.*


/**
 * @author feiwo
 *
 * course sign failed helper step 5
 *
 */
class HelperStepFifthFragment : Fragment(), ActivityTemplateMethod {


    companion object {
        fun newInstance() = HelperStepFifthFragment()
    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                              savedInstanceState: Bundle?): View? {
        return inflater.inflate(R.layout.fragment_helper_step_one, container, false)
    }

    override fun onActivityCreated(savedInstanceState: Bundle?) {
        super.onActivityCreated(savedInstanceState)
        init()
        setOnListener()
    }

    override fun setupView() {
        btnLeft.visibility = View.GONE
        btnRight.visibility = View.GONE
        btnCenter.visibility = View.VISIBLE
    }

    override fun setupViewData() {
        val helperStr = "5.教室网络问题导致无法一键签到，请联系班长，请老师提供签到二维码进行。<br/><br/>课后请联系运维人员QQ：3394055292";

        tvHelperTips.text = Html.fromHtml(helperStr)
    }

    private fun setOnListener() {
        btnCenter.setOnClickListener {
            activity?.finish()
        }
    }
}
